//
//  UITableView+ObserveData.m
//  UKListManager
//
//  Created by ET|冰琳 on 16/11/11.
//  Copyright © 2016年 UK. All rights reserved.
//

#import "UITableView+ObserveData.h"

@implementation UITableView (ObserveData)

- (void)uk_observeData:(id<UKListDataSource>)dataSource{
    [self addObserver:dataSource forKeyPath:@"listData" options:NSKeyValueObservingOptionNew context:nil];
}

- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSKeyValueChangeKey,id> *)change context:(void *)context{
    [self reloadData];
}

@end
